{% extends 'TopxiaWebBundle::bootstrap-modal-layout.html.twig' %}

{% block title %}{{'核实用户'|trans}}{% endblock %}
{% block body %}
  <form id="delete-form" action="{{path('admin_check_password')}}">
    <div class="row form-group">
      <div class="col-md-2 control-label">
        <label for="title">{{'用户密码'|trans}}</label>
      </div>
      <div class="col-md-8 controls">
        <input type="password" name="password" class="form-control" placeholder="请输入你的登录密码">
      </div>
    </div>
    <input type="hidden" name="courseId" value="{{course.id}}"/>
    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
  </form>
  <div id="delete-course-progress" class="delete-course-progress" style="display:none;">
    <div class="progress progress-striped active">
      <div class="progress-bar progress-bar-success" style="width: 0%"></div>
    </div>
    <div class="text-success progress-text"></div>
  </div>
{% endblock %}

{% block footer %}
  <button id="delete-btn" data-submiting-text="{{'正在提交'|trans}}" type="submit" class="btn btn-primary pull-right" data-toggle="form-submit" data-target="#delete-form"
  data-question-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'questions'}) }}"
  data-testpaper-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'testpapers'}) }}"
  data-material-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'materials'}) }}"
  data-chapter-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'chapters'}) }}"
  data-draft-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'drafts'}) }}"
  data-lessonlearns-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'lessonLearns'}) }}"
  data-lessonreplays-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'lessonReplays'}) }}"
  data-lessonviews-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'lessonViews'}) }}"
  data-homework-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'homeworks'}) }}"
  data-exercise-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'exercises'}) }}"
  data-lesson-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'lessons'}) }}"
  data-favorite-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'favorites'}) }}"
  data-note-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'notes'}) }}"
  data-thread-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'threads'}) }}"
  data-review-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'reviews'}) }}"
  data-announcement-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'announcements'}) }}"
  data-status-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'statuses'}) }}"
  data-member-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'members'}) }}"
  data-conversation-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'conversation'}) }}"
  data-course-delete-url="{{ path('admin_course_delete',{courseId:course.id,type:'course'}) }}" 
  >提交</button>
  <button type="button" class="btn btn-link pull-right btn-closed" data-dismiss="modal">{{'取消'|trans}}</button>

   <strong class="text text-danger" id="delete-hint" style="display:none;">{{'正在删除，请不要关闭当前窗口...'|trans}}</strong>

  <button id="finish-delete-btn" data-loading-text="{{'正在完成删除, 请稍等...'|trans}}" class="btn btn-primary" style="display:none;"data-dismiss="modal">{{'完成删除'|trans}}</button>
  <script>app.load('course/delete-modal')</script>
{% endblock %}